# Contributor: Marian Buschsieweke <marian.buschsieweke@posteo.net>
# Maintainer: Marian Buschsieweke <marian.buschsieweke@posteo.net>
pkgname=py3-qt.py
pkgver=1.3.10
pkgrel=1
pkgdesc="Minimal Python 2 & 3 shim around all Qt bindings"
url="https://github.com/mottosso/Qt.py"
arch="noarch !armhf" # no py3-qt5 on armhf
license="MIT"
depends="python3 py3-qt5 py3-setuptools"
makedepends="py3-gpep517"
checkdepends="py3-nose py3-six"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/mottosso/Qt.py/archive/$pkgver.tar.gz
	importlib.patch
	"
builddir="$srcdir/Qt.py-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
	.testenv/bin/python3 tests.py
}

package() {
	gpep517 install-wheel --destdir "$pkgdir" \
		.dist/*.whl
}

sha512sums="
a8cf1de389881b453dafa53d6bfd9e9bbe263effef03c9eefbc87b33798463d5117996006545687f91329b976a2e94b0b27a1bf8969728685c1a432c7c31a7b6  py3-qt.py-1.3.10.tar.gz
0ac7faa921bde9ff487c0f7c1443c2f1390cbd888055cfe174f5a8ab3b1429f695b264b371b8d5f6d0ac07136a5e064bcc534edbd8cbf8bfe65f70dd141a02c4  importlib.patch
"
